Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


These support forums are now closed for new topics and comments.
Please head on over to http://eureka.ucommerce.net/ for support.

  • shahidul 12 posts 32 karma points
    Dec 15, 2010 @ 05:52
    shahidul
    0

    Does not update the SmallCart[XSLT] product quantity

    hi 

    i am using 

    umbraco v 4.5.2 
    Ucommerce Package version 1.1.1.0
    Ucommerce  Store Package version 1.0.1.3

    In  Cart.aspx page when i click the Update Cart button its update the product quantity.

    But it Does not update the SmallCart[XSLT] product quantity, unti i refresh or reload the page.

    could you please give me some idea.

    Thanks

    shah

  • Søren Spelling Lund 1797 posts 2786 karma points
    Dec 17, 2010 @ 10:32
    Søren Spelling Lund
    0

    Hi shahidul,

    uCommerce needs to recalculate the basket whenever it changes which is done by executing the basket pipeline using the following code:

    CommerceLibrary:ExecuteBasketPipeline()
  • shahidul 12 posts 32 karma points
    Jan 07, 2011 @ 00:24
    shahidul
    0

    Thanks for your reply

     

    shahidul

     

     

  • Jigar Gala 14 posts 74 karma points
    Jun 20, 2012 @ 10:47
    Jigar Gala
    0

     

    Hi

    I am using
    uCommerce 2.6.1.0
    umbraco 4.7.2

    I see that cart.xslt already has the above line of code mentioned by Soren.
    ie: <xsl:variable name="pipelineResult" select="CommerceLibrary:ExecuteBasketPipeline()"></xsl:variable>
    in 'updateBasketTemplate'

    Yet, the small cart is not refreshed after i click update cart button.
    It only refreshes after i reload the page.

    any idea?

    Thanks
    Jigar
  • awm 187 posts 376 karma points
    Jun 20, 2012 @ 14:04
    awm
    0

    Hmm I seem to be having this problem myself. I can add the items to the cart, but it's only when I refresh the page again does it show on the page. I don't seem to have this problem when using the default xslt macros - it seems to update instantly...

  • Søren Spelling Lund 1797 posts 2786 karma points
    Jun 20, 2012 @ 15:10
    Søren Spelling Lund
    0

    Is the small cart loaded before or after the call to AddToBasket is made? 

  • awm 187 posts 376 karma points
    Jun 20, 2012 @ 16:21
    awm
    0

    Hi Soren,

    Personally I have the demo store setup but I've switched out the 'Cart' template for the razor equivalent mentioned here: http://www.publicvoid.dk/3StepsToManagingMultipleBasketItemsAsOne.aspx

    Everything's working fine ie. I can add my products to the cart and the cart displays them but only when I refresh the page. What I'd like is what you have in the demo store default configuration: If you click the button to add an item, it instantly updates the cart to say you have 1 item in your cart - you don't have to refresh the page again to see anything there.

    In answer to your question, I don't know. Like I said I'm pretty much just using the example code from the link above.

    Thanks again for your help!

  • awm 187 posts 376 karma points
    Jun 20, 2012 @ 17:37
    awm
    0

    Okay I understand what's happening now.

    It seems that in the demo, you have a macro at the top of the master page that checks for any posted back values and THEN loads the small cart macro.

    I was doing the postback check within the child template so of course it was getting executed after the small cart macro (as you rightly questioned above).

    I've managed to get it working by writing a razor macro that does the same post value check and it gets the desired result. I suppose there's no way to manually force the smallcart macro to refesh? I suppose it could be done with javascript but it's a bit of a dirty workaround :-) 

  • Søren Spelling Lund 1797 posts 2786 karma points
    Jun 20, 2012 @ 23:07
    Søren Spelling Lund
    0

    You could populate it using an AJAX call, which would occur after server side processing is done. This is the way we're going to do the new Razor starter store.

  • Jigar Gala 14 posts 74 karma points
    Jun 21, 2012 @ 12:21
    Jigar Gala
    0

    Hi Soren

    Could you please give a sample code for the AJAX call.

    Thanks

  • Søren Spelling Lund 1797 posts 2786 karma points
    Jul 04, 2012 @ 14:36
    Søren Spelling Lund
    0

    You'd have to build a page that accepts a SKU + variant SKU if you're using variants and a quantity.

    Then post to that using jQuery.

    Unfortunately I don't have a full sample available just yet.

Please Sign in or register to post replies

Write your reply to:

Draft